import moment from 'moment'
export const vehicleFields = [{
  title: 'ID',
  dataIndex: 'id',
}, {
  title: '用户ID',
  dataIndex: 'userId'
}, {
  title: '付款户名',
  dataIndex: 'fukuanhuming'
}, {
  title: '付款银行',
  dataIndex: 'fukuanyinhang'
}, {
  title: '付款账户',
  dataIndex: 'fukuanzhanghu'
}, {
  title: '金额',
  dataIndex: 'balance'
}, {
  title: '图片',
  dataIndex: 'tupian'
}, {
  title: '状态',
  dataIndex: 'status',
  customRender: (text, row, index) => {
    return {
      1: '未审核',
      2: '通过',
      3: '不通过'
    }[text * 1]
  }
}, {
  title: '类型',
  dataIndex: 'type',
  customRender: (text, row, index) => (text * 1) === 1 ? '充值' : '提现'
}, {
  title: '时间',
  dataIndex: 'createTime',
  customRender: (text, row, index) => {
    // 接口返回的是数组
    if (Array.isArray(text)) {
      text[1] = (text[1] - 1)
    }
    return moment(text).format('YYYY-MM-DD HH:mm:ss')
  }
}, {
  title: '操作',
  dataIndex: 'operation',
  scopedSlots: { customRender: 'operation' },
  fixed: 'right',
  width: 100
}]
